package com.hz.apiService.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author LiiiYiAn
 * @version 1.0
 * @createDate 2023-09-25 10:01
 * @projectName SchoolServicePlatformFinal
 * @className ApiResponseCodeEnum
 * @description 标识接口返回值的含义
 */
@AllArgsConstructor
@Getter
public enum ApiResponseCodeEnum {

    /**
     * 00000 接口请求正常 success
     * 00401 请求的资源无读取权限 resource forbidden
     * 00403 请求的接口无权限 interface forbidden
     * 00404 请求的资源不存在 resource is not exist
     * 00405 接口内部错误 interface error
     * 00500 系统内部错误，通常由最外层异常捕获后返回 system error
     */
    SUCCESS("00000", "success"),
    RESOURCE_FORBIDDEN("00401", "resource forbidden"),
    INTERFACE_FORBIDDEN("00403", "interface forbidden"),
    RESOURCE_NOT_FOUND("00404", "resource is not exist"),
    INTERFACE_ERROR("00405", "interface error"),
    SYSTEM_ERROR("00500", "system error"),;

    private final String code;
    private final String message;

}
